Page({
    data:{
        address:['北京','上海','广州','深圳'],
        users:[
            {id:1001,name:"张三",age:21},
            {id:1002,name:"李四",age:22},
            {id:1003,name:"王五",age:23},
            {id:1004,name:"赵六",age:24}
        ],
        user:"",            //选中的用户name
        region:[]
    },
    //地址选择器
    addressChange(e){
        // console.log(e)
        let index=e.detail.value;
        this.setData({
            selectedAddress:this.data.address[index]
        })
    },
    //选择用户
    userChange(e){
        // console.log(e)
        this.setData({
            user:this.data.users[e.detail.value]
        })
    },
    // 选择时间
    timeChange(e){
        // console.log(e)
        this.setData({
            time:e.detail.value
        })
    },
    //选择地区
    regionChange(e){
        // console.log(e)
        this.setData({
            region:e.detail.value
        })
    }
})